I've been trying to make my local Xampp-based website properly use SSL for our local intranet system.
Windows Edition: Windows Server 2016 Standard
XAMPP Version 7.4.1
PHP Version 7.4.1
HTTP Port: 8080
SSL Port: 4443
I followed Apache Tutorial, which uses Xampp's version of Openssl to create the necessary certificates for SSL.
https://community.apachefriends.org/viewtopic.php?f=16&t=77006&sid=e0291bc38dd9b562cd74e5f72153c1f7#
These steps get the un-encrypted version up and running:
Now, I create the ssl root ca and certificate request:
(Setup file "httpd-ssl" to incorporate these certificates)
Listen 4443
<VirtualHost default:4443>
# General setup for the virtual host
ServerAdmin admin@example.com
DocumentRoot "C:/xampp/htdocs/site_intranet/"
ServerName www.site.local:4443
ServerAlias www.site.local
ErrorLog "C:/xampp/apache/logs/error.log"
TransferLog "C:/xampp/apache/logs/access.log"
SSLEngine on
SSLCertificateFile "C:/xampp/apache/conf/ssl.crt/www.site.local.crt"
SSLCertificateKeyFile "C:/xampp/apache/conf/ssl.key/www.site.local.key"
(Import ROOT CA to Browser and Windows) - Import to Windows as a trusted CA: Check - Firefox Browser: Check
Problem: all attempts to access www.site.local (by either port) result in the "not secure" warning from Firefox.
I've tried to check Apache errors for some guidance. It's running fine.
The only Firefox error I get is "This website does not supply ownership information."
I know you can no longer just put in a basic certificate, but I'd hoped that first building a Root CA and then designing the certificate from that would provide the chain of trust required to enable SSL. Am I missing something simple here?
I have been asked for something that secure's locally, without any third-party sources for certificates. Got to make something work locally.
I think here is a blog you can follow to solve your issue by ACME Root CA:
https://medium.com/@tbusser/creating-a-browser-trusted-self-signed-ssl-certificate-2709ce43fd15
Here're recap from the blog:
Command Recap
The following commands are needed to create a root certificate:
openssl genrsa -des3 -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
The following commands are needed to create an SSL certificate issued by the self created root certificate:
openssl req -new -nodes -out server.csr -newkey rsa:2048 -keyout server.key
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 -extfile v3.ext
The referenced v3.ext file should look something like this:
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = acme-site.dev
DNS.2 = acme-static.dev
Thanks for Thijs Busser.